# -*- utf-8 -*-
# @Time: 2021/7/29 10:33
# @Author: CACode
from datetime import datetime

from utils.Rsa import MD5

KEY_PREFIX = {
    # 短信
    "sms": lambda x: "SMS_" + str(x),
    'login': lambda x, y: 'TOKEN_' + MD5.encryption(
        MD5.encryption(str(x) + str(y)) +
        str(datetime.now())
    ),
    # 'login': lambda x, y: jwt.encode(x, y, algorithm='HS256').decode(),
    'sign': lambda x: "SIGN_" + str(x),
    'reset': lambda x: "RESET_" + str(x),
}
